<%= semantic_form_for(@user) do |form| %>
<% if @user.errors.any? %>
<div id="error_explanation">
	<h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:</h2>
	<ul>
		<% @user.errors.full_messages.each do |msg| %>
		<li>
			<%= msg %>
		</li>
		<% end %>
	</ul>
</div>
<% end %>
<div class="form-left">
	<%= form.inputs "User detail" , :class=>"detail-form" do %>
	<%= form.input :login , :required => true , :input_html => { :disabled => @read_only }%>
	<%= form.input :password , :required => true, :input_html => { :disabled => @read_only }%>
	<%= form.input :password_confirmation , :required => true , :input_html => { :disabled => @read_only }%>
	<%= form.input :group  , :required => true , :input_html => { :disabled => @read_only }%>
	<%= form.input :branch  , :required => true , :input_html => { :disabled => @read_only }%>
	<%= form.input :failed_login_count  ,:hint => "Consecutive failed logins more than 3 times, account has been disabled." , :input_html => { :disabled => @read_only }%>
	<%= form.input :language  ,:include_blank => false , :collection => [[t(:english),'en'],[t(:thai),'th']], :input_html => { :disabled => @read_only }%>
	<%if @read_only %>
	<%= form.input :login_count  , :input_html => { :disabled => @read_only }%>
	<%= form.input :current_login_at  , :input_html => { :disabled => @read_only }%>
	<%= form.input :current_login_ip  , :input_html => { :disabled => @read_only }%>
	<% end %>
	<% end %>
</div>
<%unless @read_only %>
<%= form.commit_button %>
<% end %>
<% end %> 